package ch.ra.dev.nastywheel.util;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class Contact implements Parcelable{
	private String name = "";

	private String contactData = "";
	
	public Contact(String name, String contactData) {
		this.name = name;
		this.contactData = contactData;
	}
	
	public Contact(Parcel source) {
		name = source.readString();
		contactData = source.readString();
	}
	
	public static Parcelable.Creator<Contact> CREATOR
	    = new Parcelable.Creator<Contact>()
	{
		public Contact createFromParcel(Parcel in)
		{
			return new Contact(in);
		}
		
		public Contact[] newArray(int size)
	    {
	        return new Contact[size];
	    }
	};
	
	public String getContactData() {
		return contactData;
	}

	public String getName() {
		return name;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(getName());
		dest.writeString(getContactData());
	}
}
